﻿<?xml version="1.0" encoding="utf-8"?>
<Rules FriendlyName="FxCop rules used by the ASP.NET Webstack team">

    <!-- MW10xx: Resource rules -->
    <Rule TypeName="UnusedResourceUsageRule" Category="Microsoft.Web.FxCop" CheckId="MW1000">
        <Name>UnusedResourceUsageRule</Name>
        <Description>This rule fires when a resource is unused in the assembly.</Description>
        <Url></Url>
        <Resolution>Remove the unused resource '{0}' from '{1}'.</Resolution>
        <Email></Email>
        <MessageLevel Certainty="95">Error</MessageLevel>
        <FixCategories>Breaking</FixCategories>
        <Owner></Owner>
    </Rule>

    <!-- MW11xx: Finalizer rules -->
    <Rule TypeName="DoNotUseFinalizers" Category="Microsoft.Web.FxCop" CheckId="MW1100">
        <Name>Do not use finalizers</Name>
        <Description>For performance reasons, managed types should not implement finalizers.</Description>
        <Url></Url>
        <Resolution>Type '{0}' has a finalizer. Use SafeHandle to contain unmanaged data instead.</Resolution>
        <Email></Email>
        <MessageLevel Certainty="100">Error</MessageLevel>
        <FixCategories>Breaking</FixCategories>
        <Owner></Owner>
    </Rule>

    <!-- MW12xx: Task rules -->
    <Rule TypeName="DoNotConstructTaskInstances" Category="Microsoft.Web.FxCop" CheckId="MW1200">
        <Name>Do not construct instances of the Task-related types</Name>
        <Description>For performance reasons, all tasks should be created using the TaskHelpers library.</Description>
        <Url></Url>
        <Resolution>Do not construct instances of Task-related types. If you need to create a Task, use the TaskHelpers class instead.</Resolution>
        <Email></Email>
        <MessageLevel Certainty="100">Error</MessageLevel>
        <FixCategories>NonBreaking</FixCategories>
        <Owner></Owner>
    </Rule>
    <Rule TypeName="DoNotCallProblematicMethodsOnTask" Category="Microsoft.Web.FxCop" CheckId="MW1201">
        <Name>Do not call problematic methods on Task</Name>
        <Description>For performance reasons, use the TaskHelpers and TaskHelpersExtensions library rather than methods on Task.</Description>
        <Url></Url>
        <Resolution>Do not call the method 'Task.{0}'. {1}</Resolution>
        <Email></Email>
        <MessageLevel Certainty="100">Error</MessageLevel>
        <FixCategories>NonBreaking</FixCategories>
        <Owner></Owner>
    </Rule>
    <Rule TypeName="DoNotUseProblematicTaskTypes" Category="Microsoft.Web.FxCop" CheckId="MW1202">
        <Name>Do not call use problematic Task types</Name>
        <Description>For performance reasons, use the TaskHelpers and TaskHelpersExtensions library rather than Task-related types.</Description>
        <Url></Url>
        <Resolution>Do not use the type '{0}'. {1}</Resolution>
        <Email></Email>
        <MessageLevel Certainty="100">Error</MessageLevel>
        <FixCategories>NonBreaking</FixCategories>
        <Owner></Owner>
    </Rule>
</Rules>
